import socket
import struct

sk=socket.socket()
sk.bind(('127.0.0.1',9001))
sk.listen()
conn,addr=sk.accept()
msg1=input('>>>>>').encode('utf-8')
msg2=input('>>>>>').encode('utf-8')
print(len(msg1.decode('utf-8')),len(msg2))
blen=struct.pack('i',len(msg1))
conn.send(blen)

conn.send(msg1)
conn.send(msg2)

msg_client=conn.recv(1024)
print(msg_client.decode('utf-8'))

conn.close()

sk.close()










